//
//  OperatorMapExample.swift
//  rxExample
//
//  Created by 刘山 on 2021/11/3.
//

import Foundation
import UIKit
import RxSwift
import RxCocoa
import SnapKit

@objc(OperatorMapExample)
public class OperatorMapExample: UIViewController {
    let disposeBag = DisposeBag()
    
    public override func viewDidLoad() {
        self.view.backgroundColor = UIColor.white
        
        let obs:Observable<Int> = Observable.create({ observer in
            observer.onNext(1)
            observer.onNext(2)
            observer.onNext(3)
            return Disposables.create()
        })
        
        obs.map { $0 > 1 }
        .subscribe { print($0) }
        .disposed(by: disposeBag)
    }
}
